package com.shangyitong.yygh_hosp.repository;

import com.shangyitong.yygh.model.hosp.Schedule;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface HospitalScheduleRepository extends MongoRepository<Schedule,String>{
    Page<Schedule> findByHoscode(String hoscode, Pageable pageable);
    Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);
    List<Schedule> getScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, Date toDate);

    Schedule getById(String scheduleId);
}
